package com.blex.misp.entity;
/*
 ---------------------------------------------
 CREATE TABLE `customer` (
  `ID` int(11) not NULL AUTO_INCREMENT,
  `CUSTOMERNO` varchar(36) NOT NULL,
  `CUSTOMERNAME` varchar(36) NOT NULL,
  `TELEPHONE` varchar(36) DEFAULT NULL,
  `ADDRESS` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `CUSTOMERNO` (`CUSTOMERNO`)
) ENGINE=INNODB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
------------------------------------------------------------ 
 */

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * Producttype generated by hbm2java
 * @author blex
 */
@Entity
@Table(name = "CUSTOMER")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Customer implements java.io.Serializable {
	private int id;
	private String customerno;
	private String customername;
	private String telephone;
	private String address;
	
	@Id
	@Column(name = "ID", unique = true, nullable = false, length = 11)
	@GeneratedValue(generator = "generator") 
	@GenericGenerator(name = "generator", strategy = "identity") 	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	@Column(name = "CUSTOMERNO",unique = true, nullable = false, length = 36)
	public String getCustomerno() {
		return customerno;
	}
	public void setCustomerno(String customerno) {
		this.customerno = customerno;
	}
	@Column(name = "CUSTOMERNAME",nullable = false, length = 36)
	public String getCustomername() {
		return customername;
	}
	public void setCustomername(String customername) {
		this.customername = customername;
	}
	@Column(name = "TELEPHONE", length = 36)
	public String getTelephone() {
		return telephone;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	@Column(name = "ADDRESS", length = 36)
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
}
